package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.model.service.OrderModel;
import com.fortune.rainshinecommon.query.StockQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface PurchaseFeign {
    /**
     * 获取上级的库存产品列表
     * @param query
     * @return
     */
    @PostMapping("/purchase/getStockProductList")
    @ResponseBody
    MsgModel getStockProductList(@RequestBody StockQuery query);

    @PostMapping("/purchase/order")
    MsgModel order(@RequestBody OrderModel model);
}
